using System;
using FytSoa.Common.Utils;
using System.ComponentModel.DataAnnotations;
using FytSoa.Application.Hr;
using FytSoa.Application.Sys;
using SqlSugar;

namespace FytSoa.Application.Crm;

/// <summary>
/// 客户信息
/// </summary>
public class CrmCustomerDto : AppEntity
{
    /// <summary>
    /// 客户编号
    /// </summary>
    public string Number { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>
    [Required]
    [StringLength(255)]
    public string Name { get; set; }

    /// <summary>
    /// 客户电话
    /// </summary>
    [Required]
    [StringLength(255)]
    public string Tel { get; set; }

    /// <summary>
    /// 客户邮箱
    /// </summary>
    public string Email { get; set; }

    /// <summary>
    /// 客户来源
    /// </summary>
    [Required]
    public long Source { get; set; }
    
    /// <summary>
    /// 客户来源
    /// </summary>
    public SysCodeDto SourceObj { get; set; }

    /// <summary>
    /// 负责人
    /// </summary>
    [Required]
    public long EmployeeId { get; set; }
    
    /// <summary>
    /// 负责人
    /// </summary>
    public HrEmployeeSimpleDto EmployeeObj { get; set; }

    /// <summary>
    /// 客户级别
    /// </summary>
    [Required]
    public long Level { get; set; }
    
    /// <summary>
    /// 客户级别
    /// </summary>
    public SysCodeDto LevelObj { get; set; }

    /// <summary>
    /// 客户行业
    /// </summary>
    [Required]
    public long Industry { get; set; }
    
    /// <summary>
    /// 客户行业
    /// </summary>
    public SysCodeDto IndustryObj { get; set; }
    
    /// <summary>
    /// 网址
    /// </summary>
    public string SiteUrl { get; set; }

    /// <summary>
    /// 所属区县
    /// </summary>
    public string County { get; set; }

    /// <summary>
    /// 详细地址
    /// </summary>
    public string Address { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string Remark { get; set; }

    /// <summary>
    /// 0=线索1=正常2=公海
    /// </summary>
    [Required]
    public int Type { get; set; } = 1;
    
    /// <summary>
    /// 是否删除
    /// </summary>
    [Required]
    public bool IsDelete { get; set; } = false;
    
    /// <summary>
    /// 锁定状态，锁定后，无法加入公海
    /// </summary>
    [Required]
    public bool IsLock { get; set; } = false;

    /// <summary>
    /// 创建时间
    /// </summary>
    [Required]
    public DateTime CreateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreateUser { get; set; }

    /// <summary>
    /// 修改时间
    /// </summary>
    public DateTime? UpdateTime { get; set; }

    /// <summary>
    /// 修改人
    /// </summary>
    public string UpdateUser { get; set; }


}

/// <summary>
/// 客户信息
/// </summary>
public class CrmCustomerSimpleDto : AppEntity
{
    /// <summary>
    /// 客户名称
    /// </summary>
    public string Name { get; set; }

}